package com.cxm.qyyz.utils.flow;

import android.view.View;
import android.view.ViewGroup;

/**
 * @author zwl
 * @date on 2021/8/7
 */
public class Utils {
public static  int getViewWidth(View view) {
        view.measure(0, 0);
        return view.getMeasuredWidth();
    }

    /**
     * 移除父布局中的子布局
     *
     * @param view
     */
    public static void removeFromParent(View view) {
        if (view.getParent() != null) {
            ((ViewGroup) view.getParent()).removeView(view);
        }
    }
}
